package mviewer.renderer.software.shader;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Polygon;
import mviewer.renderer.software.interfaces.IBuffer;
import mviewer.renderer.software.interfaces.ILighting;
import mviewer.renderer.software.interfaces.IShader;
import mviewer.types.IPolygon;

public class ShaderWireframeDecorator implements IShader {

	private IShader shader;

	public ShaderWireframeDecorator(IShader shader) {
		this.shader = shader;
	}

	@Override
	public void drawPolygon(Graphics g, IPolygon p3, Polygon p2,
			ILighting light, IBuffer buffer) {
		this.shader.drawPolygon(g, p3, p2, light, buffer);
		g.setColor(Color.WHITE);
		g.drawPolygon(p2);
	}
}
